<?php
include("admin/sesiune.php");
$username = $_SESSION["username"];
$pret = $_POST['pret'];
$numeProd = $_POST['numeProd'];
$query ="INSERT INTO comenzi (pr_id, username) SELECT cos.cos_id, cos.username FROM cos WHERE username = '$username'";
$showProd = mysql_query($query,getConnection()) or die (mysql_error());
$deleteQuery= "DELETE FROM cos WHERE username = '$username'";
$delProd = mysql_query($deleteQuery,getConnection()) or die (mysql_error());
if ($showProd = true)
{
return $delProd;
}
?>
